<template>
    <!--顶部通栏-->
    <AppTopnav/>
    <!--头部组件-->
    <AppHeader/>
     <!--内容容器-->
    <div class="app-body">
        <!-- 二级路由 -->
        <RouterView/>
    </div>
    <!--底部组件-->
    <AppFooter/>

</template>

<script>
import AppTopnav from '@/components/app-navbar.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-foorter.vue'
import {useStore} from 'vuex'
    export default {
  name: 'Layout',
  components: {
    AppTopnav,
    AppHeader,
    AppFooter
  },
  // 获取下分类数据
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style>
.app-body {
  min-height: 600px;
}
</style>